package com.qingcloud.fexecutor.base.handler;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Map;

/**
 * API执行器
 */
public interface ApiHandler {

    /**
     * @param request   http请求
     * @param response  http响应
     * @param headers   请求头
     * @param querys    url请求参数
     * @param forms     表单请求参数
     * @param forms     PATH路径参数
     * @param bodyValue 请求体
     * @return 请求结果
     * @throws Throwable
     */
    Object invoke(HttpServletRequest request, HttpServletResponse response,
                  Map<String, String> headers, Map<String, Object> querys,
                  Map<String, Object> forms, Map<String, Object> paths, Object bodyValue) throws Throwable;

}
